namespace ThingsGateway.Foundation.Rpc.TouchRpc
{
    /// <summary>
    /// 接收流数据
    /// </summary>
    public class StreamOperationEventArgs : StreamEventArgs
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="streamOperator"></param>
        /// <param name="metadata"></param>
        /// <param name="streamInfo"></param>
        public StreamOperationEventArgs(StreamOperator streamOperator, Metadata metadata, StreamInfo streamInfo) : base(metadata, streamInfo)
        {
            StreamOperator = streamOperator ?? throw new ArgumentNullException(nameof(streamOperator));
            IsPermitOperation = true;
        }

        /// <summary>
        /// 流操作
        /// </summary>
        public StreamOperator StreamOperator { get; private set; }
    }
}